package proxy;

/**
 * @author honway.liu
 * @date 2019-05-31 09:11
 * @email gm100861@gmail.com
 * @blog http://linuxsogood.org
 */
public class StudentProxy implements Person {

    private Student student;

    public StudentProxy(Person student) {
        if (student.getClass() == Student.class) {
            this.student = (Student) student;
        }
    }

    @Override
    public void giveMoney() {
        student.giveMoney();
    }
}
